package com.ziyun.erp.modules.business.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ziyun.erp.modules.business.dao.OrderSellerScholarshipDao;
import com.ziyun.erp.modules.business.entity.OrderSellerScholarshipEntity;
import com.ziyun.erp.modules.business.service.OrderSellerScholarshipService;
import io.renren.common.utils.PageUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("orderSellerScholarshipService")
public class OrderSellerScholarshipServiceImpl extends ServiceImpl<OrderSellerScholarshipDao, OrderSellerScholarshipEntity> implements OrderSellerScholarshipService {

    @Override
    public PageUtils list(Map<String, Object> params) {
        Page<OrderSellerScholarshipEntity> page = new Page<>();
        page.setCurrent(Integer.valueOf(params.get("page").toString()));
        page.setSize(Integer.valueOf(params.get("limit").toString()));
        List<OrderSellerScholarshipEntity> list = this.baseMapper.list(page, params);
        page.setRecords(list);
        return new PageUtils(page);
    }

    @Override
    public OrderSellerScholarshipEntity findOne(Integer id) {
        return this.baseMapper.findOne(id);
    }

    @Override
    public List<Map<String, Object>> sellerList() {
        return this.baseMapper.sellerList();
    }

}
